<?php
require_once(dirname(dirname(__FILE__)) . '/app.php');

$shopList = Shop::GetAllShops();

$defaultShopId = 1;

$action = $_GET['action'];
if( $action == 'del' && $_GET['id'] > 0 ){
	if( $oauthMap[45] == null){
		exit;
	}
	Service::DeleteById($_GET['id'], $login_user_id);
}

if($_GET['shop_id'] != null){
	$defaultShopId = abs( intval( $_GET['shop_id'] ) );
}
if( $defaultShopId == 0 ){
	$serviceList = Service::GetAll();
}else{
	$serviceList = Service::GetAllByShopId($defaultShopId);
}


if( $oauthMap[40] == null){
	exit;
}

include template('/service/service_list');


//include template('service_staff_index');
//include template('subscribe');
